package com.baike.feign;

import com.baike.data.Result;
import com.baike.domain.CategoryDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("baike-education-advertising-service")
public interface AdvertisingServiceFeign {

    @GetMapping("/tbContentCategory")
    Result getCategoryInfo();

    @DeleteMapping("/tbContentCategory/ID/{id}")
    Result deleteCategoryById(@PathVariable("id")Integer[] id);

    @GetMapping("/tbContentCategory/get/{id}")
    Result getCategoryById(@PathVariable("id")Integer id);

    @PostMapping("/tbContentCategory/{name}/{price}")
    Result insertCategoryInfo(@PathVariable("name")String name,@PathVariable("price")Double price);

    @PutMapping("/{id}/{name}/{price}")
    Result updateCategoryInfo(@PathVariable("name")String name,@PathVariable("price")Double price,
                              @PathVariable("id")Long id);
}
